CLS
n = 12
DIM k(n)
FOR i = 1 TO n
PRINT "vvedite element"; i
INPUT k(i)
NEXT
FOR i = 1 TO n
IF k(i) = 0 THEN c = i: EXIT FOR
NEXT
CLS
FOR i = 1 TO n
PRINT k(i);
NEXT
PRINT
PRINT "c ="; c
Тестирование выполнено в программе QB64 ( Скачать )